﻿using Coder.Object2Report;
using Text.Helper;

namespace Fee.IO.Exporters
{
   
    public class ProjectExportor : BaseExportor<Project>
    {
        protected override string SheetName => "投资项目";

        protected override Report<Project> CreateReportStructure(RenderBase render)
        {
            var result = new Report<Project>(render);
            result.Column(f => f.No);
            result.Column(f => f.Name);
            result.Column(f => f.CreateYear);
            result.Column(f => f.FirstOrderTime != null ? f.FirstOrderTime.Value.ToString("yyyy-MM-dd") : "");
            result.Column(f => f.LastOrderTime != null ? f.LastOrderTime.Value.ToString("yyyy-MM-dd") : "");
            result.Column(f => f.LevelProcess.GetEnumDisplayName());
            result.Column(f => f.Amount.ToString("#.00"));

            result.Column(f => f.Comment);
            result.Column(f => f.ConstructionContent);
            result.Column(f => f.Station);
            result.Column(f => f.YearTargetDesscription);
            result.Column(f => f.Status.GetEnumDisplayName());
            result.Column(f => f.Owner);
            result.Column(f => f.StationType.GetEnumDisplayName());

            return result;
        }
    }
}